<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>thymeleaf中的日期格式化</h1>
<h3> 没有使用日期格式化 </h3>
<span th:text="${today}"></span>
<hr/>
<h3>使用了thymeleaf日期格式化，默认以浏览器的默认语言作为格式化标准</h3>
<span th:text="${#dates.format(today)}"></span><hr/>
<h3>自定义日期的格式</h3>
<span th:text="${#dates.format(today,'yyyy-MM-dd hh:mm:ss')}"></span><hr/>
<h3>年</h3>
<span th:text="${#dates.year(today)}"></span><hr/>
<h3>月</h3>
<span th:text="${#dates.month(today)}"></span><hr/>
<h3>日</h3>
<span th:text="${#dates.day(today)}"></span><hr/>

</body>
</html>